import 'package:erp/data/model/process_inform.dart';
import 'package:erp/data/model/process_node.dart';
import 'package:erp/data/model/process_type.dart';
import 'package:get/get.dart';

class FlowChartController extends GetxController {
  late List<ProcessNode> processNodeList;
  late ProcessType processType;
  late List<ProcessInform> processInformList;

  @override
  void onInit() {
    var data = Get.arguments['data'];
    this.processType = ProcessType.fromJson(data['processType']);
    this.processNodeList = data["processNodeList"].map<ProcessNode>((m) => ProcessNode.fromJson(m)).toList();
    this.processInformList = data["processInformList"].map<ProcessInform>((m) => ProcessInform.fromJson(m)).toList();
    super.onInit();
  }
}
